home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Tools / Alpha 6.51b13 ƒ / Help / Alpha Commands < prev    next >
Text File  |  1997-03-29  |  38KB  |  713 lines

  1. ==============================================================================
  2. = Alpha Commands
  3. ==============================================================================
  4.  
  5. In this list of routines, text between '<' and '>' is a placeholder for a 
  6. required parameter, text between '[' and ']' is a placeholder for an 
  7. optional parameter, and the '|' signifies a choice of two or more 
  8. alternatives.  A '+' signifies that the previous symbol can be present one 
  9. or more times, while a '*" means zero or more times.  Some commands have no 
  10. parameters, and are only expected to be called interactively.
  11.  
  12.  
  13.  
  14. The following are Alpha-specific tcl routines:
  15.  
  16. • abortEm - aborts whatever is currently happening
  17. • abbrev <label> <string> [<mode>] - register a label for <string>. See 
  18. 'execAbbrev'.
  19. • addAlphaChars <chars> - Add <chars> to the list of characters that internally 
  20.   are caught by the 'isalnum' and 'isalpha' calls. Can be used to augment 
  21.   the list of characters that the \w pattern in a regular expression 
  22.   responds to. Use w/ care.
  23. • addMenuItem [-m] [-l <meta-characters>] <menu name> <item name> - Convert
  24.   item to menu form and add to specified menu. If '-m' specified, menu 
  25.   form conversion not done. The '-l' option allows you to use menu meta 
  26.   characters as text of menu items. If the '-l' option is used, the 
  27.   <meta-characters> string is interpreted for menu item attributes, and 
  28.   meta-characters in <item name> are included in the menu item text 
  29.   literally. For example: 
  30.       addMenuItem -m -l "/B" "Hello/C" 
  31.   would appear as the text "Hello/C" in the menu, and have "B" as its 
  32.   command equivalent.
  33. • addDef <var> <val> - Permanently save an association between the var 
  34.   'var' and 'val'. 'addDef' and 'addArrDef' are now the sanctioned way to 
  35.   save values between sessions. Also see 'removeDef' and 'removeArrDef'.
  36. • addArrDef <var> <field> <val> - Permanently save an association between 
  37.   the var var(field) and 'val'.
  38. • AEBuild [<flags>] <app (name|creator)> <aesuite> <aeevent> [<event parameters>]*  -
  39.   Build and send an apple-event. 'AEBuild' is apple's code of the same 
  40.   name. Each "event parameter" is two parameters, a parameter type and 
  41.   the data for the parameter. See the AEBuild doc for more details, 
  42.   :Tcl:SystemCode:think.tcl for examples. The flags are '-r' (wait for reply), 
  43.   '-q' (queue reply, in which case 'handleReply' (in appleEvents.tcl) is 
  44.   called with the reply as a parameter, and '-t <timeout>' specifies the 
  45.   timeout in ticks.
  46. • alertnote message_string
  47.   This command will display message_string in a standard Macintosh alert box.
  48. • alphaHelp - display Alpha help.
  49. • ascii (see bindings).
  50. • askyesno [-c] prompt
  51.   This command will display a Macintosh alert box with 'prompt' displayed
  52.   with the push buttons Yes and No. The command will return the 
  53.   string "yes" or "no". The '-c' flag specifies that a cancel button be 
  54.   used as well.
  55. • backColor - set background color
  56. • backSpace - delete selection, or a single char if no selection.
  57. • backwardChar - moves insertion one char back
  58. • backwardCharSelect - extends selection one char back
  59. • backwardDeleteWord - deletes previous word
  60. • backwardWord - moves insertion one word back
  61. • balance - selects smallest set of parens, braces, or 
  62.   brackets that encloses the current selection
  63. • beep
  64. • beginningBufferSelect - extend selection to the 
  65.   beginning of the buffer
  66. • beginningLineSelect - extend selection to the 
  67.   beginning of the line
  68. • beginningOfBuffer - move insertion to the beginning 
  69.   of the buffer
  70. • beginningOfLine - move insertion to the beginning of 
  71.   the line
  72. • bind  (see bindings)
  73. • blink <pos> - blink cursor at 'pos'
  74. • breakIntoLines <string> - return 'string' with 
  75.   carriage returns and spaces inserted to satisfy 
  76.   'leftFillColumn' and 'fillColumn' variables.
  77. • bringToFront <winName> - Bring named window to front.
  78. • buttonAlert <prompt> [<button>…] - Create a dialog w/ the specified 
  79.   buttons, returning the one selected.
  80. • capitalizeRegion - capitalize all words in selected 
  81.   region 
  82. • capitalizeWord - capitalize word
  83. • centerRedraw - redraw window with current line in 
  84.   the middle.
  85. • clear - clear selected text
  86. • closeAll - close all windows
  87. • colors <fore red> <fore green> <fore blue> <back red> <back green> <back blue>
  88. • colorTriple [<prompt>] [<red> <green> <blue>] - Prompts user to choose 
  89.   color. If specified, the input RGB value is used as the initial color on 
  90.   the colorpicker.
  91. • copy - copy region
  92. • cp <fromName>+ <toName>
  93.   This command will copy the file fromName and name the new file toName, 
  94.   overwriting any existing file. This command copies both data forks, and 
  95.   the Finder information. 
  96. • createTagFile - searches all files in current file set 
  97.   and saves the locations of any function declarations
  98.   in a file called 'cTAGS'.
  99. • createTMark <name> <pos> - create a temporary 'mark' 
  100.   at location 'pos'. 
  101. • currentPosition - displays current and total bytes.
  102. • cut - deletes and saves region
  103. • decToHex - convert decimal number to hex.
  104. • deleteChar - delete char AFTER cursor
  105. • deleteMenuItem [-m] <menu name> <item name> - Convert item to menu form 
  106.   and delete from specified menu. If '-m' specified, menu form conversion 
  107.   not done. 
  108. • deleteModeBindings <mode> - Delete all bindings for specified mode.
  109. • deleteSelection - delete current position, don't save
  110. • deleteWord - delete word after cursor
  111. • describeBinding - display the binding of the next typed key sequence. 
  112. • deleteText <pos1> <pos2> - remove text between 'pos1' 
  113.   and 'pos2'
  114. • dialog [<-w width>|<-h height>|<-b title l t r b>|<-c title val l t r b>|
  115.             <-t text l t r b>|<-e text l t r b>|<-r text val l t r b>|
  116.             <-p l t r b>]+ 
  117.   Create and display a dialog.  '-w' and '-h' allow width and height of 
  118.   dialog window to be set.  '-b', '-c', '-r', '-t', '-e' and '-p' allow 
  119.   buttons, checkboxes, radio buttons, static text, editable text and gray 
  120.   outlines to be created, respectively.  All control types (except gray 
  121.   outlines) require specification of a title or text, together with left, 
  122.   top, right, and bottom coordinates.  Checkboxes and radioboxes have an 
  123.   additional parameter, the default value.  At least one button must be 
  124.   specified.  The return value is a list containing resulting values for 
  125.   all buttons, radioboxes, checkboxes, and editable textboxes (static text 
  126.   is ignored).  Buttons have value '1' if chosen, '0' otherwise.  The 
  127.   dialog box exits at the first button press.
  128.  
  129. • dirs - show current directory stack. See 'pushd' and 'popd'.
  130. • display [-w <win>] <pos> - move pos's line to top of screen.
  131. • displayMode <mode> - Up to four characters of the 'mode' string are 
  132.   displayed in the status line at the bottom of a window.
  133. • dosc [<-c 'sign' | -n appName>] [-k 'clas'] [-e 'evnt'] <-s string | -f fileName> [<-t timeout|-r>]
  134.   Send an AppleEvent, by default class 'misc', event 'dosc'.
  135.    -c 'sign' 
  136.            "sign" is a four-letter creator signature of a running application.
  137.    -n appName
  138.            "appName" is the name of a running application.
  139.    -k 'clas'
  140.            "clas" is a four-letter event class.
  141.    -e 'evnt'
  142.            "evnt" is a four-letter event class.
  143.    -s string
  144.            "string" is the text of a script to send to the other app.
  145.    -f fileName
  146.            "fileName" is the complete or relative pathname of a file the other 
  147.            application should execute.
  148.    -t timeout
  149.            "timeout" is the number of ticks Alpha should wait for a response. A 
  150.            timeout of "0" means wait forever.
  151.    -r
  152.            Do not wait for reply.
  153.    -q
  154.            Queue reply.
  155.            
  156.    If neither of the '-c' and '-n' options is chosen, the PPC Browser is 
  157.    used. Either '-s' or '-f' must be chosen. Thus, you can have "Alpha 
  158.    5.02" and "Alpha 5.02 Copy" sending Apple events to each other, or they 
  159.    can send events to a remote server such as Apple's ToolServer. 
  160.    "$HOME:Tcl:UserCode:createStuffitArchive.tcl" contains examples of 
  161.    controlling Stuffit Deluxe via this command.
  162. • downcaseRegion - changes all uppercase letters to 
  163.   lowercase in current region
  164. • downcaseWord - changes all uppercase letters to 
  165.   lowercase in current word
  166. • dumpColors - dump current foreground and background
  167.   colors into the current buffer in Alpha-readable
  168.   format.
  169. • dumpMacro - prompts for a name and then dumps a tcl proc representation 
  170.   of the current keyboard macro into the current window.
  171. • echo <string>* - echo the strings (used 
  172.   in shells).
  173. • edit [-r] [-m] [-c] [-w] [-g <l> <t> <w> <h>] <name> - Open a file in new 
  174.   window. '-c' means don't prompt for duplicate win if file already open.
  175.   '-r' means open the file read-only. '-m' means omit the function titlebar 
  176.   menu and present only the marks titlebar menu, which is labeled with the 
  177.   contents of 'markLabel'. The '-g' option allows left and top coords to 
  178.   be specified, plus width, and height. All or none. '-w' allows you to
  179.   bypass the "Wrap" dialog for files with long rows.
  180. • enableMenuItem <menuName> <item text> <on|off> - Either enable or 
  181.   disable the menu item of user menu 'menuName' that has text '<item 
  182.   text>'. Note that unless the menu is not only created, but also already
  183.   inserted, this command has no effect. 
  184. • endBufferSelect - extend selection to the end of the 
  185.   buffer
  186. • endKeyboardMacro - stop recording keyboard macro
  187. • endLineSelect - extend selection to the end of line
  188. • endOfBuffer - move insertion to the end of the buffer
  189. • endOfLine - move insertion to the end of the line
  190. • enterSelection - use current selection for future searches.
  191. • eventHandler [class] [event] [proc] - Register 'proc' to handle the class 
  192.   and event specified. Class and event are each 4 char args. 'proc' takes 
  193.   a single argument that specifies the incoming event according to the 
  194.   syntax here. There is currently no provision for a reply.
  195. • exchangePointAndMark - exchange the current 'mark' 
  196.   w/ the current insertion point
  197. • execAbbrev - looks at current word and tries to expand it. Labels are 
  198.   specified using 'abbrev'.
  199. • execute - prompt user for a function or macro. The 
  200.   tab key acts as a "completion" command.
  201. • executeKeyboardMacro - execute the current keyboard 
  202.   macro
  203. • fileInfo - prompts for a file, and displays type, 
  204.   creator, sizes of both data and resource forks, last
  205.   modification time, and creation time
  206. • fileRemove - prompts for a file, and removes it
  207. • find - bring up the find dialog
  208. • findAgain - repeat search forward
  209. • findAgainBackward - repeat search backward
  210. • findFile [<path>] - open a file in a new window. An optional path parameter
  211.   specifies a default directory or file.
  212. • findInNextFile - search next file.
  213. • findTag - prompt user for a function name and attempt 
  214.   to use the file 'cTAGS' to locate the function's 
  215.   definition
  216. • float -m <menu> [<-h|-w|-l|-t|-M> <val>] [-n winname] [-z tag] -
  217.   Takes a created menu (not necessarily in the menubar), and makes a 
  218.   floating window out of it. Returns integer tag that is used to remove 
  219.   the window. NOT DYNAMIC!  W/ no options returns all currently defined menus.
  220.   Displayed w/ system floating window WDEF if system 7.5, plainDBox 
  221.   otherwise. -h through -M change width, height, left margin, top margin, and
  222.   margin between buttons. -z allows a ten-char tag to be specified for 
  223.   'floatShowHide'.
  224. • floatShowHide <on|off> <tag> - Shows or hides all floats w/ specified 
  225.   tag. Tags of current modes are automatically shown/hidden.
  226. • forwardChar - move insertion one character forward
  227. • forwardCharSelect - extend selection one character 
  228.   forward
  229. • forwardWord - move insertion one word forward
  230. • freeMem - give a rough approximation of the current 
  231.   memory reserves of ALPHA
  232. • get_directory [-p <prompt>]
  233.   This command will display a standard Macintosh file dialog and request the user 
  234.   select a folder. The command will return the selected folder's full path name, or an 
  235.   empty string if the Cancel button was selected.
  236. • getAscii - displays the ASCII code for character at 
  237.   current insertion point
  238. • getChar - waits for a keystroke, returns ascii.
  239. • getModifiers - returns current modifiers mask. "OR" of several values, 
  240.     cmdKey                        = 0x01,                        /* Bit 0 of high byte */
  241.     shiftKey                    = 0x02,                        /* Bit 1 of high byte */
  242.     alphaLock                    = 0x04,                        /* Bit 2 of high byte */
  243.     optionKey                    = 0x08,                        /* Bit 3 of high byte */
  244.     controlKey                    = 0x10,                        /* Bit 4 of high byte */
  245.     rightShiftKey                = 0x20,                        /* Bit 5 of high byte */
  246.     rightOptionKey                = 0x40,                        /* Bit 6 of high byte */
  247.     rightControlKey                = 0x80,                        /* Bit 7 of high byte */
  248. • getColors - returns list of colors/hypertext for current document. 
  249.   Format is list of lists, each sublist consisting of file offset, color 
  250.   index, and possibly a hypertext command.
  251. • getfile [<prompt>] [<path>]
  252.   This command will display an SFGetFile() and return the full path name of the 
  253.   selected file, or an error if CANCEL button was selected.  An optional path 
  254.   parameter specifies a default directory or file.
  255. • getFileInfo <file> <arr> - Given a file name, creates an array called 
  256.   'arr' in the current context, containing fields 'created', 'creator', 
  257.   'modified', 'type', 'datalen', and 'resourcelen'. 'created' and 
  258.   'modified' are in a form suitable for the command 'mtime'.
  259. • getGeometry [win] - return a TCL list containing the left 
  260.   edge of the current window, the top, the width, and height.
  261. • getline <prompt> <default>
  262.   This command will display a Macintosh alert box with prompt displayed, a 
  263.   text edit field with default initially in the field, and with the push 
  264.   buttons OK, Cancel.. The command will return the text entered into the 
  265.   text edit field by the user, or an empty string if the user selected the 
  266.   Cancel button. 
  267. • getMainDevice - return a list containing the left, top, right, and 
  268.   bottom of the rectangle defining the main device.
  269. • getMark - return the current mark.
  270. • getNamedMarks [-w <win>] [-n] - 
  271.   return list of all permanent marks in open files. Each
  272.   element of a list describes one mark as a sublist of the mark's name, 
  273.   the complete pathname of the mark's file, the position of the first 
  274.   character in the first line displayed, the current position, and the 
  275.   end of the selection if text is hilited, or the current position again 
  276.   if there is no hilited section. '-w' allows window name to be applied 
  277.   as filter, '-n' means only names will be returned.
  278. • getPathName - prompt the user with an SFGetFile dialog and return 
  279.   complete pathname.
  280. • getPos [-w <win>] - return the current insertion point
  281. • getScrap - returns system TEXT scrap.
  282. • getSelect - return the currently selected text, if 
  283.   any.
  284. • getText [-w <win>] <pos1> <pos2> - return the text between 'pos1' 
  285.   and 'pos2'. '-w' can be used to specify a window.
  286. • getTMarks - Return a list of temporary marks. Each item of the returned 
  287.   list is a sublist containing the mark name, the complete pathname of the 
  288.   mark, and the start and finish of the selection named by the mark. The 
  289.   following is an example of the result: 
  290.  
  291.     {{temp1 External:file.c 1312 1315} {temp2 Internal:it.h 111 111}} 
  292.  
  293. • getWinInfo [-w <win>] <arr> - Creates an array in current context 
  294.   containing info about either the current or a specified window. Array 
  295.   has fields 'state', 'platform', 'read-only', 'tabsize', 'split', 
  296.   'linesdisp' (num lines that can be seen in the window), 'currline' 
  297.   (first line displayed), and 'dirty'.
  298. • glob [-i] [-t <TYPE>] [-c <CRTR>]
  299.   The original glob provided by the UNIX version of tcl was not quite 
  300.   adequate for the more complex Macintosh file system. Issues such as 
  301.   invisible file handling, Finder type and creator filtering, and space 
  302.   handling in file names. Release 6 of tcl has dealt with the original 
  303.   problem with spaces in filenames, but the following options are provided 
  304.   to deal with additional Macintosh issues. 
  305.  
  306. Anyway, the new glob now takes several options. They are:
  307.     -i    This option causes glob to list invisible files also.
  308.     -t TYPE    This option causes glob to only list file with the 
  309.         indicated Finder file typeTYPE. This option may be 
  310.         used with the -c option.
  311.     -c CRTR    This option causes glob to only list file with the 
  312.         indicated Finder file creatorCRTR. This option may 
  313.         be used with the -t option.
  314.         Also note that the original glob would skip dot files
  315.         (i.e., file names the begin with a period) 
  316.         in the listing, unless the pattern began with a period.
  317.         Tickle extends this concept one step further on the
  318.         Macintosh, and skips spot files (i.e., file names that 
  319.         begin with '•'), unless the pattern starts with a spot.
  320. • goto <pos> - goto the position 'pos'.
  321. • gotoMark - goto named mark, use 'mark' in macros.
  322. • gotoTMark <name> - goto the temporary mark 'name'.
  323. • hexToDec <num> - hex to decimal conversion.
  324. • icon [-f <winName>] [-c|-o|-t|-q] [-g <h> <v>] - Having to do w/ 
  325.   iconifying windows. '-c' means close (iconify) window, '-o' open, '-t' 
  326.   toggle open/close, '-q' returns either a '1' for an iconified window or a 
  327.   '0' for an uniconified window, and '-g' moves the icon to horizontal 
  328.   position <h> and vertical position 'v'. Options are executed as they 
  329.   are parsed, so the '-f' option, if present, should always be first. 
  330. • icURL <URL> - passes arg to Internet Config, if present. Error if not 
  331.   present. 
  332. • icGetPref [<-t <type>] <pref name> - Gets preference from 
  333.   Internet Config. '-t' allows type to be set, '0' returns a string 
  334.   (default), '1' returns a path name, commonly used for helper apps. A 
  335.   <pref name> of 'all' returns all valid preferences.
  336. • icOpen - Opens Internet Config
  337. • insertAscii - prompts for an ASCII code and inserts
  338.   into text.
  339. • insertColorEscape <pos> <color ind> [hypertext func] - Create a color 
  340.   or style "point" for documentation purposes. Look at the file 
  341.   "docColors.tcl" for examples. The hypertext func is only used when the 
  342.   "point" is underline. See 'getColors' for info about the current file.
  343. • insertFile - prompts for a file name and inserts the
  344.   corresponding file into the current window. Not
  345.   undoable.
  346. • insertMenu <name> - insert the previously created user menu 'name' into 
  347.   the menuBar. 
  348. • insertPathName - present the user w/ a SFGetFIle dialog 
  349.   and paste the complete path-name of the chosen file
  350.   into the current window
  351. • insertText [-w <win name>] <text>* - Insert 'text' at the current 
  352.   insertion point. Mark is unchanged.
  353. • insertToTop - make the line that the insertion point 
  354.   is on the first line shown, and display the current 
  355.   line number along w/ the total number of lines in file
  356. • isearch - incremental search: searches w/o a dialog,
  357.   searches as you type the search pattern. Does not do
  358.   regular expression searches. 'matchWords' 
  359.   automatically set to false.
  360. • iterationCount - allows actions to be repeated many times. "control-u 44 
  361.   =" inserts 44 '='s into current window.  Also can be used to execute any 
  362.   function or macro (including the keyboard macro) many times.  Defaults to 
  363.   4.
  364. • jumpToRegister - prompts for a single char, and then jumpts to 
  365.   temporary mark of that name created by 'pointToRegister'.
  366. • keyAscii - insert ascii representation (in decimal)
  367.   of the keydown event, plus a modifier string, if 
  368.   necessary.
  369. • keyCode - insert the key code along w/ a string 
  370.   representing and modifiers into the current window.
  371.   Can be used to create bindings in 'Alphabits'.
  372. • killLine - kill text from insertion point to the end 
  373.   of the line. If the line has no text, delete the line 
  374.   and move succeeding lines up one.
  375. • killWindow - kill current window
  376. • largestPrefix <list> - Returns the longest prefix contained in all 
  377.   strings of 'list'.
  378. • launch -f <name> - launch the named app into the background. Note that 
  379.   for some yet unexplained reason, some applications (MicroSoft Word) 
  380.   won't launch completely in the background. 'launch'ing such 
  381.   applications won't insert the application into any system menu that 
  382.   specifies running applications (although "About the Finder..." will 
  383.   list it. The only way to get to such an app is through Alpha's 
  384.   'switchTo', after which the application will finish launching. The '-f' 
  385.   option gets around this by launching the application in the foreground 
  386.   instead.
  387. • lineStart <pos> - return the position of the start of
  388.   the line 'pos' is on.
  389. • listBindings - list all current bindings.
  390. • listpick [-p <prompt>] [-l] [-L <def list>] <list>
  391.   This command will display a dialog with the list displayed in a List Manager 
  392.   list. If the user presses the Cancel button, an empty string is returned. If 
  393.   the user selects the Open button, or double clicks an item in the list, that 
  394.   item will be returned. If '-l' is specified, than the return is a list of 
  395.   items.
  396. • load - loads hilited text, or entire window if 
  397.   nothing is hilited. 'load'ing means that whatever 
  398.   bindings or macro definitions are present in the 
  399.   loaded text take effect
  400. • lookAt [-w <name>] <pos> - return the 'pos'th character of the 
  401.   current file, or the file named by <name> if the '-w' option is specified.
  402. • markHilite - This is the 'Hilite' from the 'Edit'
  403.   menu. If there is a currently hilited selection, the 
  404.   selection is unhilited, leaving the mark and the 
  405.   insertion point around the old selection. If there 
  406.   is not a selection, the region between the insertion 
  407.   point and the mark is selected.
  408. • markMenuItem [-m] <menuName> <item text> <on|off> [<mark char>] - Either mark or unmark
  409.   the menu item of user menu 'menuName' that has text '<item text>'. 
  410.   Note that unless the menu is not only created, but also already
  411.   inserted, this command has no effect. 
  412. • matchBrace - moves the insertion point to the 
  413.   character that matches the character after the current 
  414.   insertion point
  415. • matchIt <brace char> <pos> [<limit>] - Return pos of matching brace. Recognizes 
  416.   parenthesis, square brackets, and curly braces. Optional third argument 
  417.   specifies how many characters to search.
  418. • maxPos [-w <win>] - returns the number of characters in the front
  419.   window.
  420. • menu [-s] [-n <name>] [-i <num] [-m] [-M <mode>] [-p <procname>] <list of menu items> - 
  421.   Defines a new menu named 'name' (if provided w/ '-n' option). The menu is not 
  422.   yet inserted into the menubar. The menu commands may be nested for 
  423.   heirarchical menus, see 'AlphaBits.tcl' for examples. Alpha massages the 
  424.   function names to make them look better in the menus. 
  425.   '-c'            Ignore any menu meta-chars. Can also be done on a per-item basis 
  426.                   by appending an ampersand ('&') to the end of an item.
  427.   '-s'            Use system menu definition proc (faster).
  428.   '-n <num>'    Resource id of icon suite to use for menu title. 'ics#' 
  429.                 is the only resource that is really necessary.
  430.   '-n <name>'    Name the menu. Not necessary for submenus.
  431.   '-m'            No menu form. If not supplied, each menu item is split into 
  432.                   words at each capitalized letter.
  433.   '-p <name>'     The tcl proc named by 'name' is called w/ the menu's name
  434.                   and the item's contents when the item is chosen.
  435.   '-M <mode>'    Specifies that any bindings created by the menu are 
  436.                   specific to a given mode. This is important because mode-specific
  437.                   bindings over-ride global bindings.
  438. • message <string> - prints 'string' on the status line.
  439. • mkdir <name> - creates a directory (folder) named 
  440.   'name' in the current directory.
  441. • mousePos - Returns list <row,col> of mouse position, if the mouse is 
  442.   currently over the active window. Otherwise, return error (catch w/ 
  443.   'catch').
  444. • moveInsertionHere [-last] - move the insertion point to the 
  445.   first (or last) line displayed
  446. • moveFile <fromName> <toName>
  447.   This command will move the file fromName to toName, overwriting any 
  448.   existing file. The move can not be made across volume (disk drives) 
  449.   boundaries. 
  450. • moveWin [win name] <left> <top> - moves current or specified window. 
  451.   The window name can be "StatusWin".
  452. • mtime <time> [long|short|abbrev]
  453.   Returns a date and time string using the Macintosh International Utilities. The 
  454.   long/short/abbrev specification corresponds to the date. These are the following 
  455.   formats:
  456.     short        3/16/92 9:20:46 PM
  457.     abbrev    Mon, Mar 16, 1992 9:20:49 PM
  458.     long        Monday, March 16, 1992 9:20:43 PM
  459.   The returned value actually is in the form of a list. To get text as 
  460.   above, run the result through 'join', as in "join [mtime [now] short]".
  461. • nameFromAppl '<app sig>' - Interrogates the desktop database for the first 
  462.   existing app that has the desired signature. <app sig> is four chars 
  463.   inside single quotes.
  464. • new [-g <l> <t> <w> <h>] [-n <name>] - opens an untitled window. Can optionally 
  465.   provide left and top coordinates, plus width and height. All or none.
  466. • nextLine - move insertion point to next line
  467. • nextLineSelect - extend selection to the next line
  468. • nextLineStart <pos> - return the position of the start 
  469.   of the next line after position 'pos'.
  470. • nextSentence - go to next sentence ("fill.tcl").
  471. • nextWindow - select next window
  472. • now
  473.   Returns the current time as Macintosh seconds. This is the number of seconds that 
  474.   have elapsed since Midnight Jan 1, 1904.
  475. • oneSpace - converts whitespace surrounding insertion
  476.   into a single space.
  477. • openLine - insert a new line following the current 
  478.   one and move the insertion point to it
  479. • otherPane - If window is split, select the other pane.
  480. • pageBack - display prev screenful, move the
  481.   insertion point if 'moveInsertion' enabled
  482. • pageForward - display next screenful, move the
  483.   insertion point if 'moveInsertion' enabled
  484. • pageSetup - display the printing PageSetup dialog.
  485. • paste - insert the last chunk of text created by 'cut' 
  486.   or 'copy'
  487. • pointToRegister - prompts for a single character, and then assigns a 
  488.   temporary mark of that name to the current insertion point. Point can 
  489.   be jumped to via 'jumpToRegister'.
  490. • popd - Pop top dir off dir stack and 'cd' to it.
  491. • posToRowCol <pos> - converts from absolute position to row, col.
  492. • prefixChar - used to further modify the next keystroke 
  493.   combination, in the same manner as using the shift key 
  494.   in the next keystroke
  495. • previousLine - move insertion point to the previous 
  496.   line
  497. • prevLineSelect - extend selection to the previous line
  498. • prevSentence - go to previous sentence ("fill.tcl").
  499. • prevWindow - select previous window
  500. • print - print front window
  501. • processes - returns info of active processes. A list of lists, each 
  502.   sublist contain a file-name, an application signature, the application 
  503.   memory size, and the number of ticks the application has been active.
  504. • prompt <prompt> <default> [<name> <menu item>*] - prompt dialog to 
  505.   the user with a prompt string and a default value. The prompt dialog can 
  506.   optionally include a popup menu specified by 'name' and the succeeding 
  507.   strings. Selection of the popup menu items inserts the item text into the 
  508.   editable dialog item. 'Prompt' returns the value of the editable item. 
  509.   If the 'Cancel' button is selected, the tcl returns an error and your 
  510.   script will be stopped unless you execute the command from 'catch'.
  511. • pushd [<dir>] - If 'dir' specified, push current folder into directory 
  512.     stack and 'cd' to dir. Otherwise, swap current dir w/ top of dir stack.
  513. • putfile <prompt> <original>
  514.   This command will display an SFPutFile() and return the full path name of the 
  515.   selected file, or an empty string if CANCEL button was selected. Original is the 
  516.   default name displayed for the user.
  517. • putScrap [<string>]+ - Concatenate strings together into the system 
  518.   scrap. The scrap can be appended to through calls of the form 'putScrap 
  519.   [getScrap] " another word"'.
  520. • pwd
  521.   This command will return the current working directory, ending in a colon.
  522. • quit - quits ALPHA
  523. • rectMarkHilite - creates a rectangular selection 
  524.   between the mark and the insertion point.
  525. • redo - redo the next action that has been undone but 
  526.   not redone
  527. • regModeKeywords [options] <mode> <keyword list> - Set keywords and comments that 
  528.   Alpha can recognize to color them. Specifically, in mode <mode>, every 
  529.   keyword specified in the list is colored non-black (blue, by default). 
  530.   Comments, if specified by '-e' or '-b' below, are colored red by defualt.
  531.     -a                                Keywords will be *added* to existing mode
  532.                                     keywords. The new keywords can be a different
  533.                                     color than older keywords. This flag can also be
  534.                                     used to modify other attributes, but it cannot be
  535.                                     used to modify colors of existing keywords.
  536.     -m <c>                            Specify a magic character. Every word beginning with the 
  537.                                     magic character is a keyword.
  538.     -e <commentstr>                    Specify a string that begins comments that last to 
  539.                                     the end of the line. 
  540.     -b <comment beg> <comment end>    Specify a pair of strings that bracket a 
  541.                                     comment.
  542.     -c <color>                        Comment color.
  543.     -k <color>                        Keyword color.
  544.     -s <color>                        String color. Alpha can color single-line
  545.                                     strings only, using the simple heuristic
  546.                                     of assuming the first two double quotes
  547.                                     constitute a string. 
  548.     -i <char>                        Specify a character to display differently.
  549.                                     Commonly used for curly braces, etc.
  550.     -I <color>                        Color of above characters.
  551.     Keywords must be less than 20 characters long.
  552. • removeArrDef <var> <field> - Remove the pernament definition of 
  553.  'var(field)'. See 'addDef' and 'addArrDef'.
  554. • removeDef <var> - Remove the permanent definition of 'var'.
  555. • removeFile <fileName>
  556.   This command will delete the file or folder 'fileName'.
  557. • removeMark [-all]|[[-n <mark name] [-w <specname>]]- allows marks to be 
  558.   removed. If no options are specified, it's interactive.
  559. • removeMenu <name> - remove menu 'name' from menubar, except those 
  560.   specified by previous 'makeMenuPermanent' calls.
  561. • removeTMark <name> - remove temporary mark.
  562. • replace - replace the current selection
  563. • replaceAll - replace all further occurrences in the current file.
  564. • replace&FindAgain - replace the current selection and find next 
  565.   occurrence.
  566. • replaceString [<str>] - specifies replacement string. Returns current 
  567.   replacement string if no arg.
  568. • replaceText <pos1> <pos2> [text]+ - replaces the text
  569.   between 'pos1' and 'pos2' with 'text', where 'text' can be any number 
  570.   of arguments. Leaves insertion at end, mark at beginning of inserted 
  571.   text. 
  572. • restoreVars - restore variables to saved state, 
  573.   see 'saveVars'
  574. • revert - revert the file to its last saved version
  575. • rmdir <dirname> - remove a directory (folder)
  576. • rowColToPos [-w <win>] <row> <col> - converts to abosolute position.
  577.   Accepts optional -w parameter that allows window to be specified.
  578. • rsearch - reverse incremental search, see 'isearch'.
  579. • save - save current window
  580. • saveAs [def name] - save current window with new name. Optionally takes 
  581.   a default filename. Returns complete path of saved file, if ok hit, 
  582.   otherwise TCL_ERROR returned. 
  583. • saveVars - save variable state, see 'restoreVars'
  584. • scrollDownLine - same action as that which occurs when 
  585.   the down arrow in the vertical scrollbar is selected
  586. • scrollLeftCol - same action as that which occurs when
  587.   the left arrow in the horizontal scrollbar is selected
  588. • scrollRightCol - same action as that which occurs when
  589.   the right arrow in the horizontal scrollbar is 
  590.   selected
  591. • scrollUpLine - same action as that which occurs when 
  592.   the up arrow in the vertical scrollbar is selected
  593. • search  [options…] <pattern> <pos> - 
  594.   -f <num>        - go forward?
  595.   -r <num>        - regular expression?
  596.   -s            - save previous search string and search flags.
  597.   -i <num>        - ignore case?
  598.   -m <num>        - match words?
  599.   -n            - failed search still returns TCL_OK, but null string.
  600.   -l <limit>    - limit on how search goes.
  601.   --             - next arg is the pattern.
  602.  
  603.   Searches for 'pattern' from position 'pos'.  If the search succeeds, a 
  604.   list of two positions will be returned.  The first is the starting position 
  605.   of the match, the second is one past the last character. If no '-n', 
  606.   TCL_ERROR returned.
  607. • searchString [<str>] - allows search string to be specified. Returns 
  608.   current searchstring if no arg.
  609. • select <pos1> <pos2> - selects the text between 'pos1' 
  610.   and 'pos2'.
  611. • selEnd [-w <win] - returns the end of the hilited selection, or 
  612.   the current insertion point if no text is selected.
  613. • sendOpenEvent [filler] <app name> <file name> - Send an open doc event to 
  614.   another currently running application. If 'filler' is noReply, then a 
  615.   reply is not requested. Otherwise, we wait for a reply and 'filler' is 
  616.   ignored. 
  617. • sendToBack <winName> - Sent named window to back.
  618. • setFileInfo <file> <field> [arg] - Allows some information to be set 
  619.   for files. Settable fields are 'modified', 'created', 'creator', and 'type'.
  620.   All take an argument except 'resourcelen' which just removes the resource fork. 'file' is a complete pathname.
  621. • setFontsTabs - bring up font and tab dialog
  622. • setMark - set the current mark to the insertion point
  623. • setNamedMark [name disp pos end] - set named mark. If optional arguments are 
  624.   present, the mark is created without prompting user. 'disp' is the 
  625.   character position of the start of the first line to be displayed, 
  626.   while 'pos' and 'end' bracket the text to be selected.
  627. • setWinInfo [-w <win>] <field> <arg> - Sets a piece of data about either 
  628.   the current or a specified window. Settable fields 'platform', 'state', 
  629.   'read-only', 'tabsize', 'dirty', and 'shell'. 'shell' means that dirty 
  630.   flag ignored and undo off.
  631. • shell - open the Tcl shell.
  632. • shiftLeftRegion - shifts the current region left a tab
  633. • shiftRightRegion - shift the current region right a 
  634.   tab
  635. • sizeWin [win name] <width> <height> - sets size of current or specified window.
  636.   The window name can be "StatusWin", although only the width can be 
  637.   changed.
  638. • sortMarks - sorts all marks of open windows, w/o 
  639.   setting the dirty flag. If the files are saved, the 
  640.   marks will be saved in alphabetical order.
  641. • spacesToTabs - convert spaces in selection to tabs
  642. • specToPathName [hex data] - given an FSSpec in hex form (as that 
  643.   returned by aebuild, for instance, see the definition of thinkFileName 
  644.   in :Tcl:SystemCode:think.tcl), return a complete pathname.
  645. • splitWindow [percent] - toggle having window split into two panes. 
  646.   Optional arg specifies percent of window to allocate to the first pane. 
  647. • startEscape - used to further modify the next 
  648.   keystroke combination, in the same manner as using the 
  649.   shift key in the next keystroke
  650. • startKeyboardMacro - start recording keyboard macro
  651. • statusPrompt <prompt> [<func>] - Prompt in the status window. If 'func' 
  652.   is present, call this routine at each key-press with the current 
  653.   contents of the status line and the key, insert into statusline 
  654.   whatever is returned by the func. Command-v pastes the current (<80 
  655.   char) clipboard contents on the status line.
  656. • substituteVars <string> - Takes a single string and
  657.   substitutes for all variables inside it, regardless of
  658.   depth. Unfortunately, you currently need to make 'global var' 
  659.   declarations in the proc you call this for each 'var' that might need 
  660.   to be substituted in the string (see proc.tcl for examples).
  661. • switchTo <appName> - Switches to application 'appName'.
  662. • tab - insert a tab
  663. • tabsToSpaces - convert tabs in selection to spaces.
  664. • tclFileCompletion - completes the previous word as a
  665.   file is in a shell window
  666. • tclResult - displays a dialog showing the result of 
  667.   the last TCL evaluation.
  668. • thinkReference <-t|-l> <think reference page> - Interact with Think 
  669.   Reference 2.0. '-t' retrieves a template without leaving Alpha, '-l' 
  670.   switches to Think Reference and goes to the specified page.
  671. • ticks
  672.   Returns the current TickCount. Ticks are 60ths of a seconds. TickCount is the 
  673.   number of ticks since the Macintosh was started. The command:
  674.         puts stdout [expr "[ticks] / 60"]
  675.   will print the number of seconds since the Macintosh was booted.
  676. • toggleScrollbar - toggles horizontal scrollbar on frontmost window. 
  677.   Will not succeed if scrollbar scrolled.
  678. • traceFunc on <funcName> <winName> Trace 'funcName', send output to 
  679.                                     'winName'. 
  680.   traceFunc off                        Turn function tracing off.
  681.   traceFunc status                    Display current tracing status.
  682. • unascii  (see bindings)
  683. • unbind  (see bindings)
  684. • undo - undo the last action that has not been undone
  685. • unfloat <float num> - removes specified floating window. W/ no options 
  686.   lists all floating windows.
  687. • upcaseRegion - convert all lowercase letters to 
  688.   uppercase in the current region
  689. • upcaseWord - convert all lowercase letters to 
  690.   uppercase in the current word
  691. • version - Return string of the form "Alpha Version 5.31, Feb. 15, 1993".
  692. • watchCursor - turns the cursor into a a watch cursor.
  693. • wc <file>... - counts chars, words, lines of input files.
  694. • winNames [-f] - return a TCL list of all open windows. If '-f' option 
  695.   specified, complete pathnames are returned.
  696. • wrap - see the section on "Fill" routines.
  697. • wrapText
  698. • xtclcmd [-f filename] <cmdname> [argument_list]*
  699.   This command will load the external command cmdname and pass it the argument 
  700.   list [ cmdname argument_list... ]. External command are code resources of type 
  701.   XTCL. They may be located in the resource fork of the tickle application, or they 
  702.   may be located in a file named XTCL File in the same directory as the tickle 
  703.   application. If the optional -f filename is included, the external command will first 
  704.   be loaded from filename before the other two files.
  705.   See the appendix for a detailed description of the external tcl command interface. 
  706.   See the accompanying sources for an example of writing an XTCL.
  707. • yank - insert the last piece of deleted text of less
  708.   than 1k. Consecutive deletes are concatenated.
  709.   together.
  710. • zapInvisibles - removes chars < ascii 32, except for
  711.   LF's and CR's.
  712. • zoom - zooms the current window
  713.